import fetch from "./request.js";

// 查询
export function pageAllowancePolicy(data) {
  return fetch("/nb-pc/1.0.1/AllowancePolicyService/pageAllowancePolicy", {
    method: "post",
    data: data,
  });
}
// 详情
export function detailAllowancePolicy(data) {
  return fetch("/nb-pc/1.0.1/AllowancePolicyService/detailAllowancePolicy", {
    method: "post",
    data: data,
    headers:{
      "Content-Type":"application/json; charset=utf-8"
    },
    withLoading: true,
  });
}
// 新增
export function addAllowancePolicy(data) {
  return fetch("/nb-pc/1.0.1/AllowancePolicyService/addAllowancePolicy", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 修改
export function updateAllowancePolicy(data) {
  return fetch("/nb-pc/1.0.1/AllowancePolicyService/updateAllowancePolicy", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 发布
export function releaseAllowancePolicy(data) {
  return fetch("/nb-pc/1.0.1/AllowancePolicyService/releaseAllowancePolicy", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 取消发布
export function unreleaseAllowancePolicy(data) {
  return fetch("/nb-pc/1.0.1/AllowancePolicyService/unreleaseAllowancePolicy", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 推荐
export function recommendAllowancePolicy(data) {
  return fetch("/nb-pc/1.0.1/AllowancePolicyService/recommendAllowancePolicy", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 取消推荐
export function unrecommendAllowancePolicy(data) {
  return fetch("/nb-pc/1.0.1/AllowancePolicyService/unrecommendAllowancePolicy", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
// 删除
export function deleteAllowancePolicy(data) {
  return fetch("/nb-pc/1.0.1/AllowancePolicyService/deleteAllowancePolicy", {
    method: "post",
    data: data,
    withLoading: true,
  });
}
